<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		{:sp_get_admin_breadcrumb(array('url' => U('App/upgrade_add'), 'icon' => 'plus', 'title' => '添加新版本'))}
		<form class="well form-search" method="post" action="{:U('AdminPost/index')}">
			应用： 
			<select class="select_2" name="app_id">
				<option value='0'>全部</option>
				<foreach name="applist" key="id" item="app">
					<option value="{$id}" <eq name="id" value="$app_id">selected</eq>>{$app.name}({$types[$app['type']]})</option>
				</foreach>
			</select> &nbsp;&nbsp;
			<input type="submit" class="btn btn-primary" value="搜索" />
		</form>
		<table class="table table-hover table-bordered table-list" id="menus-table">
			<thead>
				<tr>
					<th>编号</th>
					<th>APP</th>
					<th>版本</th>
					<th>升级类型</th>
					<th>升级地址</th>
					<th>升级提示</th>
					<th>确认升级提示</th>
					<th>取消升级提示</th>
					<th>状态</th>
					<th>升级内容</th>
					<th>更新时间</th>
					<th>{:L('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="app">
				<tr>
					<td>{$app.id}</td>
					<td>{$applist[$app['app_id']]['name']}</td>
					<td>{$app.version_code}</td>
					<td>
						<switch name="app.type">
						    <case value="1">升级</case>
						    <case value="2">强制升级</case>
						    <default />不升级
						</switch>
					</td>
					<td><empty name="app.apk_url">-<else/><a href="{$app.apk_url}" target="_blank">查看</a></empty></td>
					<td>{$app.upgrade_point}</td>
					<td>{$app.confirm_title}</td>
					<td>{$app.cancel_title}</td>
					<td>
						<switch name="app.status">
						    <case value="1">已发布</case>
						    <case value="-1">已下架</case>
						    <default />待发布
						</switch>
					</td>
					<td>{$app.mark}</td>
					<td>{$app.update_at}</td>
					<td>
						<a href="{:U('App/upgrade_edit', array('id'=>$app['id']))}">编辑</a> | 
						<a class="js-ajax-delete" href="{:U('App/upgrade_del', array('id'=>$app['id']))}">删除</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>